<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
  <%@ page import="fy.bean.*,java.util.*,java.io.*" %>  
<%
request.setCharacterEncoding("utf-8");
String title = request.getParameter("title");
String content = request.getParameter("content");
String category = request.getParameter("category");
int id = Integer.parseInt(request.getParameter("id"));
int homepage = Integer.parseInt(request.getParameter("homepage"));
String email = request.getParameter("email");
String phone = request.getParameter("phone");
String txtDate = request.getParameter("txtDate");
String author = request.getParameter("author");
int puton = Integer.parseInt(request.getParameter("puton"));


System.out.print(" +txtDate :"+txtDate);
System.out.println(" content ：" + content);
System.out.println(" phone : " + phone);
Zxhd zxhd = new Zxhd();

if(zxhd.doUpdata(category,title,content,author,puton,homepage,txtDate,phone,id)){
	response.setCharacterEncoding("utf-8");
	PrintWriter pout = response.getWriter();
	String st = "<script>alert('修改成功');window.location='content.jsp?category="+category+"'</script>";
	pout.print(st);
	pout.flush();
	pout.close();
}else{
	response.setCharacterEncoding("utf-8");
	PrintWriter pout = response.getWriter();
	pout.print("<script>alert('修改失败'); window.location='content.jsp?category=yzxx' </script>");
	pout.flush();
	pout.close();
	//response.sendRedirect("login.html");
};

%>    
